<template>
	 <view style="display: flex; background-color:darkgray">
	 	<view class="weaItem">{{city}}</view>
	 	<view class="weaItem">{{highWendu}}</view>
	 	<view class="weaItem">{{lowWendu}}</view>
	 </view>
	<view v-for="item in dataObj" style="margin: 10px;">
		
		<newsView 
		:title="item.title" 
		:isTop="item.isTop" 
		:count="item.conut" 
		:author="item.author"
		:time="item.time"
		:images="item.images"
		:isOneImg="item.isOneImg"
		:isguang="item.isguang">
		
		 <!--  <template v-slot:search-container v-if="item.isSearch" >
		     	<view>
				
				     <text style="color: chocolate;"> 今日金价 </text>
				
			    </view>
		   </template> -->
		
		
        </newsView>
		
	</view>
</template>

<script>
	import newsView from '../../components/newsView.vue'
	export default {
		data() {
			return {
				city:'',
				highWendu:'',
				lowWendu:'',
				
				
				dataObj: [{
						title: '第一观察 | 锚定目标 团结奋进',
						isTop: true,
						author: '新华社',
						conut: '465万',
						time: '2025-10-28'
					},
					{
						title: '泉州市————海上丝绸之路的起点',
						isTop: true,
						author: '腾讯',
						conut: '45万',
						time: '2025-10-23',
						images:[
							'/static/city1.png',
							'/static/city5.jpg',
							'/static/city3.jpg',
						]
					},
					{
						title: '仰望星空  脚踏实地',
						isTop: true,
						author: '百度',
						conut: '99999万',
						time: '2025-10-25',
						isOneImg: [
							'/static/strong.jpg',
						],
					},
					{
						title: '2025KPL年度总决赛将在北京鸟巢举办',
						isTop: true,
						author: '新浪微博',
						conut: '6547万',
						time: '2025-10-18',
						
						images:[
							'/static/bird1.jpg',
							'/static/bird2.jpg',
						]
					},
					{
						title: '法国卢浮宫遭遇盗窃',
						isTop: true,
						author: '观察者网',
						conut: '6666万',
						time: '2025-10-28',
						isSearch: true,
						isOneImg: [
							'/static/city3.jp',
						]
					},
					{
						title: 'KPL最高的山————Fly依旧屹立在赛场上',
						isTop: false,
						isguang:true,
						author: '小飞会快乐',
						conut: '666万',
						time: '2025-10-28'
					},
				]
			}
		},
		
		
		onLoad() {
			this.getWeather()
		},
		
		onShow(){
			this.getWeather()
		},
		
		methods: {
    //         getWeather() {
				// console.log(45687);
    //         	uni.request({	
    //         		url: 'http://t.weather.sojson.com/api/weather/city/101230501',
    //         		method: 'GET',
				// 	header: {
				// 		// 'Authorization': uni.getStorageSync('token'), // 携带登录凭证
				// 		'Content-Type': 'application/x-www-form-urlencoded'
				// 	},
    //         		// 接口必填参数
    //         		// data: {},
            		 
    //         		success: (res) => {
    //         			console.log('查询结果', res.data.message);
            
    //         			// 处理接口响应
				// 		this.city = res.data.cityInfo.city
				// 		this.highWendu = res.data.data.forecast[0].high
				// 		this.lowWendu = res.data.data.forecast[0].low
    //         		},
    //         		fail: (err) => {
    //         			 console.log('6666666');
    //         		},
            		
    //         	})
			 //  }	
            
		},

		components: {
			newsView,
		}
	}
</script>

<style>
.weaItem{
	margin-left: 20rpx;
}
</style>